From: Brian J. Tarricone Date: Sat, 21 Jan 2023 20:45:09 +0000 (-0800) Subject: Take UI scale into acount when loading "image-missing" fallback X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~76^2^2~22^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=89c7d5fe4b292e966794ab0d36771ea45fb5d740;p=gtk%2B3.0.git Take UI scale into acount when loading "image-missing" fallback Fallback icons loaded were loading at half size (for a 2x scale) and for cases where it mattered, were being positioned off-center. --- diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index f6e3e2956a..e51f8dcdb9 100644 --- a/gtk/gtkiconhelper.c +++ b/gtk/gtkiconhelper.c @@ -484,11 +484,12 @@ ensure_surface_for_gicon (GtkIconHelper *self, if (destination == NULL) { GError *error = NULL; - destination = gtk_icon_theme_load_icon (icon_theme, - "image-missing", - width, - flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK, - &error); + destination = gtk_icon_theme_load_icon_for_scale (icon_theme, + "image-missing", + MIN (width, height), + scale, + flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK, + &error); /* We include this image as resource, so we always have it available or * the icontheme code is broken */ g_assert_no_error (error);